package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.GarbageType;
import com.ruoyi.system.mapper.GarbageTypeMapper;
import com.ruoyi.system.service.GarbageTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/8/30
 **/
@Service
public class GarbageTypeServiceImpl implements GarbageTypeService {
    @Resource
    private GarbageTypeMapper garbageTypeMapper;

    @Override
    public List<GarbageType> selectGarbageTypeList(GarbageType garbageType) {
        return garbageTypeMapper.selectGarbageTypeList(garbageType);
    }

    @Override
    public List<GarbageType> selectAll() {
        return garbageTypeMapper.selectAll();
    }

    @Override
    public GarbageType selectById(Long id) {
        return garbageTypeMapper.selectGarbageTypeById(id);
    }

    @Override
    public List<GarbageType> selectByIds(List<Long> ids) {
        return garbageTypeMapper.selectByIds(ids);
    }

    @Override
    public Boolean createGarbageType(GarbageType garbageType) {
        return garbageTypeMapper.insertGarbageType(garbageType) == 1;
    }

    @Override
    public Boolean updateGarbageType(GarbageType garbageType) {
        return garbageTypeMapper.updateGarbageType(garbageType) == 1;
    }

    @Override
    public Boolean deleteGarbageTypeById(Long id) {
        return garbageTypeMapper.deleteGarbageTypeById(id) == 1;
    }

    @Override
    public int deleteGarbageTypeByIds(List<Long> ids) {
        return garbageTypeMapper.deleteGarbageTypeByIds(ids);
    }
}
